home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / OOSNDLIB.ZIP / PLAY.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-02-18  |  2.4 KB  |  83 lines

  1.  
  2. (*
  3.    Feb18/96 - DN
  4.  
  5.    The following code is the function to play a sound effect based on
  6.    what the game sends out to the remote ansi terminal.  The terminal
  7.    reads a special code and plays the according sound effect based on
  8.    that code.
  9.  
  10.    Notice that the names of the sound effects are hard-coded.  However,
  11.    new sound effects could be implemented by using the same names listed
  12.    below.  Included with this code is a utility called FX-LIB, and a
  13.    sample batch file of how to build a SOUND.FX library.
  14. *)
  15.  
  16.     CASE CodeS[1] OF
  17.       '1' : VocPlay('WELCOME');
  18.       '2' : VocPlay('EXPLODE');
  19.       '3' : BEGIN
  20.               VocPlay('COUNTDN');
  21.               VocPlay('EXPLODE');
  22.             END;
  23.       '4' : VocPlay('CLONE');
  24.       '5' : BEGIN
  25.               RANDOMIZE;
  26.               CASE RANDOM(2) OF
  27.                 0 : VocPlay('DANGER1');
  28.                 1 : VocPlay('DANGER2');
  29.               END;
  30.             END;
  31.       '6' : VocPlay('STEAM');
  32.       '7' : VocPlay('SCREAM1');
  33.       '8' : VocPlay('WATCH');
  34.       '9' : VocPlay('LEVELUP');
  35.       'A' : VocPlay('INFLAME');
  36.       'B' : BEGIN
  37.               RANDOMIZE;
  38.               CASE RANDOM(3) OF
  39.                 0 : VocPlay('HIT1');
  40.                 1 : VocPlay('HIT2');
  41.                 2 : VocPlay('HIT3');
  42.               END;
  43.             END;
  44.       'C' : VocPlay('TIMEISUP');
  45.       'D' : VocPlay('HEALING');
  46.       'E' : VocPlay('LRANGE2');
  47.       'F' : VocPlay('CACKLE');
  48.       'G' : VocPlay('TELEPORT');
  49.       'H' : VocPlay('GENETICS');
  50.       'I' : VocPlay('REMOTE');
  51.       'J' : VocPlay('AFBDOOR');
  52.       'K' : VocPlay('ALARM');
  53.       'L' : VocPlay('REVERSE');
  54.       'M' : VocPlay('AERIAL');
  55.       'N' : VocPlay('PHASER');
  56.       'O' : BEGIN
  57.               RANDOMIZE;
  58.               CASE RANDOM(3) OF
  59.                 0 : VocPlay('MISS1');
  60.                 1 : VocPlay('MISS2');
  61.                 2 : VocPlay('MISS3');
  62.               END;
  63.             END;
  64.       'P' : BEGIN
  65.               RANDOMIZE;
  66.               CASE RANDOM(2) OF
  67.                 0 : VocPlay('MUSIC1');
  68.                 1 : VocPlay('MUSIC2');
  69.               END;
  70.             END;
  71.       'Q' : VocPlay('DEVICE');
  72.       'R' : VocPlay('DEATH');
  73.       'S' : VocPlay('GOOD');
  74.       'T' : VocPlay('YAHOO');
  75.       'U' : VocPlay('SCREAM2');
  76.       'V' : VocPlay('WAP');
  77.       'W' : VocPlay('ZIP');
  78.       'X' : VocPlay('LRANGE3');
  79.       'Y' : VocPlay('SNIP');
  80.       'Z' : VocPlay('POW');
  81.  
  82.  
  83.